import { sendRequest } from '@/http';

// 查询服务计划列表
export const queryServicePlanList = (params: {
  page: number;
  pageSize: number;
  elderName?: string;
  associatedSite?: string;
  planStatus?: string;
}) => {
  return sendRequest({
    url: '/admin/homecare/service/plan/queryServicePlanList',
    method: 'get',
    params,
  });
};

// 查询服务计划详情
export const queryServicePlanDetail = (params: { id: string }) => {
  return sendRequest({
    url: '/admin/homecare/service/plan/queryServicePlanDetail',
    method: 'get',
    params,
  });
};

// 创建服务计划
export const createServicePlan = (params: any) => {
  return sendRequest({
    url: '/admin/homecare/service/plan/createServicePlan',
    method: 'post',
    data: params,
  });
};

// 更新服务计划
export const updateServicePlan = (params: any) => {
  return sendRequest({
    url: '/admin/homecare/service/plan/updateServicePlan',
    method: 'post',
    data: params,
  });
};

// 删除服务计划
export const deleteServicePlan = (params: { id: string }) => {
  return sendRequest({
    url: '/admin/homecare/service/plan/deleteServicePlan',
    method: 'post',
    data: params,
  });
};
